package com.twu.biblioteca.library;

public class Library {
    private static Library library = new Library();
    private static Books books = new Books();
    private static Movies movies = new Movies();

    private Library() {

    }

    static {
        books.addBook(new Book("1-1-1-1", "Clean Code"));
        books.addBook(new Book("2-2-2-2", "Refactoring"));
        library.setBooks(books);

        movies.addMovie(new Movie("Movie 1", "2013-05-07", "Black", "N/A"));
        movies.addMovie(new Movie("Movie 2", "2013-05-07", "Anne", "1"));
        movies.addMovie(new Movie("Movie 3", "2013-05-07", "Li's", "2"));
        movies.addMovie(new Movie("Movie 4", "2013-05-07", "Melon", "3"));
        movies.addMovie(new Movie("Movie 5", "2013-05-07", "David", "N/A"));

        movies.addMovie(new Movie("Movie 6", "2013-05-07", "Black", "4"));
        movies.addMovie(new Movie("Movie 7", "2013-05-07", "Black", "5"));
        movies.addMovie(new Movie("Movie 8", "2013-05-07", "Black", "6"));
        movies.addMovie(new Movie("Movie 9", "2013-05-07", "Black", "N/A"));
        movies.addMovie(new Movie("Movie 10", "2013-05-07", "Black", "7"));

        movies.addMovie(new Movie("Movie 11", "2013-05-07", "Black", "N/A"));
        movies.addMovie(new Movie("Movie 12", "2013-05-07", "Black", "8"));
        movies.addMovie(new Movie("Movie 13", "2013-05-07", "Black", "N/A"));
        movies.addMovie(new Movie("Movie 14", "2013-05-07", "Black", "9"));
        movies.addMovie(new Movie("Movie 15", "2013-05-07", "Black", "N/A"));

        library.setMovies(movies);
    }

    public static Library getLibrary() {
        return library;
    }

    public void setBooks(Books books) {
        Library.books = books;
    }

    public void setMovies(Movies movies) {
        Library.movies = movies;
    }

    public String viewAllBooks() {
        return books.viewAllBooks();
    }

    public String viewAllMovies() {
        return movies.viewAllMovies();
    }

    public boolean reserveBook(String ISBN) {
        return books.reserveBook(ISBN);
    }
}
